package com.example.mqtt.service;

import org.springframework.stereotype.Service;

/**
 * 控制定时开关状态
 */
@Service
public class TaskService {

    private volatile boolean taskEnabled = true;    // 状态标识

    public boolean isTaskEnabled() {
        return this.taskEnabled;
    }

    public void setTaskEnabled(boolean enabled) {
        this.taskEnabled = enabled;
    }

}
